package cate.common.table.farm.island.sheet;

import cate.common.table.ESheet;
import cate.common.table.farm.island.row.IslandShopItemRow;
import cate.common.util.random.RWList;
import easy.java.dev.note.NoteClass;

@NoteClass(value = "迷失神庙奇遇商店")
public class IslandShopItemSheet extends ESheet<IslandShopItemRow> {

    @Override
    public String getSheetName() {
        return "迷失神庙奇遇商店";
    }

    private RWList<IslandShopItemRow> rwList;

    @Override
    protected void onLoaded() {
        rwList = new RWList<>();
        rwList.setup(this.getList());
    }

    /**
     * 随机选取一个商品
     *
     * @return row
     */
    public IslandShopItemRow randomItem() {
        return this.rwList.get();
    }
}
